﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Ket_noi_toi_VPP_bang_mo_hinh_ba_lop.BUS;
using Ket_noi_toi_VPP_bang_mo_hinh_ba_lop.DAL;
using Ket_noi_toi_VPP_bang_mo_hinh_ba_lop.VO;
using System.Data;

namespace Ket_noi_toi_VPP_bang_mo_hinh_ba_lop.BUS
{
    class UserBusKhachhang
    {
        private KhachHang KH;

        public UserBusKhachhang()
        {
            KH = new KhachHang();
        }

        public bool Insert(UserVOKhachHang obj)
        {
            return KH.Insert(obj.TENKHACHHANG, obj.DIACHI, obj.GIOITINH, obj.DIENTHOAI, obj.EMAIL);
        }

        public bool Update(UserVOKhachHang obj)
        {
            return KH.Update(obj.MAKHACHHANG,obj.TENKHACHHANG, obj.DIACHI, obj.GIOITINH, obj.DIENTHOAI, obj.EMAIL);
        }

        public bool Delete(UserVOKhachHang obj)
        {
            return KH.Delete(obj.MAKHACHHANG);
        }

        public DataTable SelectAllTable()
        {
            return KH.SelectAll();
        }

        public DataTable SelectID(int MaKH)
        {
            return KH.SelectID(MaKH);
        }
    }
}
